package com.example.lib_base.utils

import android.graphics.Point
import android.view.WindowManager
import androidx.annotation.RestrictTo

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
object MDUtil {
    @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
   open fun WindowManager.getWidthAndHeight(): Pair<Int, Int> {
        return Point()
            .apply { defaultDisplay.getSize(this) }
            .let { Pair(it.x, it.y) }
    }
}